package thread.java20221201;

/**
 * 匿名内部类的方式, 创建Runnable的子类
 */
public class Demo5 {
    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println(5555);
            }
        };

        Thread thread = new Thread(runnable);
        thread.start();
    }
}
